// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PostitionAdditional_ExpandVehicleSignals.java

package com.uzhie.jt808.msg.entity.JT_200;


// Referenced classes of package com.ltmonitor.jt808.protocol:
//            IPositionAdditionalItem, BitConverter

import com.uzhie.jt808.msg.entity.BitConverter;
import com.uzhie.jt808.msg.entity.IPositionAdditionalItem;

public class PostitionAdditional_ExpandVehicleSignals
    implements IPositionAdditionalItem
{

    public PostitionAdditional_ExpandVehicleSignals()
    {
    }

    public final int getAdditionalId()
    {
        return 0x025;
    }

    public final byte getAdditionalLength()
    {
        return 0x04;
    }

    public final int getExpandVehicleSignals()
    {
        return expandVehicleSignals;
    }

    public final void setExpandVehicleSignals(int value)
    {
        expandVehicleSignals = value;
    }

    public byte[] WriteToBytes()
    {
        if(BitConverter.IsLittleEndian)
        {
            byte bytes[] = new byte[4];
            bytes[0] = (byte)(getExpandVehicleSignals() >> 24);
            bytes[1] = (byte)(getExpandVehicleSignals() >> 16);
            bytes[2] = (byte)(getExpandVehicleSignals() >> 8);
            bytes[3] = (byte)getExpandVehicleSignals();
            return bytes;
        } else
        {
            return BitConverter.GetBytes(getExpandVehicleSignals());
        }
    }

    public void ReadFromBytes(byte bytes[])
    {
        if(BitConverter.IsLittleEndian)
            setExpandVehicleSignals((bytes[0] << 24) + (bytes[1] << 16) + (bytes[2] << 8) + bytes[3]);
        else
            setExpandVehicleSignals(BitConverter.ToUInt32(bytes, 0));
    }

    private int expandVehicleSignals;
}
